nums1 = [4,9,5]
nums2 = [9,4,9,8,4]
nums3 = []
#nums=list(set(nums1) & set(nums2))
for i in nums1:
    if i in nums2 and i not in nums3:
        nums3.append(i)
print(nums3)